﻿#pragma once

#include "TaskThread.h"

namespace AsyncLib
{

class CChildTaskThread : public CTaskThread
{
public:
	CChildTaskThread(ATID atid);
	~CChildTaskThread() override;

	void Stop() override;
	void Exit() override;
	void PostTask(std::function<void()>&& fnTask) override;

private:
	void RunTask();

	ATID   m_atid;
	HANDLE m_hThread;
	std::condition_variable m_condVar;
};

} // namespace AsyncLib
